﻿using GuildWars2PositionManaged2;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Gw2Api
{
    public class PositionApi : BaseApi
    {
        private GuildWars2Position _source;

        public PositionApi ()
        {
            _source = new GuildWars2Position();
        }

        public WvWMaps GetCurrentMap()
        {
            var data = _source.Read();
            switch (data.Context.MapId)
            {
                case 95:
                case 1102:
                    return WvWMaps.GreenHome;
                case 94:
                case 1099:
                    return WvWMaps.RedHome;
                case 96:
                case 1143:
                    return WvWMaps.BlueHome;
                case 38:
                    return WvWMaps.Center;
            }
            return WvWMaps.All;
        }
    }
}
